package org.dromara.vehicle.modules.vehicle.domain.vo;

import cn.hutool.core.date.DatePattern;
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import org.dromara.common.translation.annotation.Translation;
import org.dromara.common.translation.constant.TransConstant;
import org.dromara.vehicle.modules.vehicle.domain.VehicleBasicInfo;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;
import java.util.List;


/**
 * 车辆基本信息视图对象 vehicle_basic_info
 *
 * @author ckk
 * @date 2025-06-24
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = VehicleBasicInfo.class)
public class VehicleBasicInfoVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @ExcelProperty(value = "主键ID")
    private Long id;

    /**
     * 车牌号
     */
    @ExcelProperty(value = "车牌号")
    private String licensePlate;

    /**
     * 车辆图片
     */
    @ExcelProperty(value = "车辆图片")
    private String vehiclePic;

    /**
     * 车辆图片Url
     */
    @Translation(type = TransConstant.OSS_ID_TO_URL, mapper = "vehiclePic")
    private String vehiclePicUrl;
    /**
     * 车辆品牌
     */
    @ExcelProperty(value = "车辆品牌")
    private String brand;

    /**
     * 购置日期
     */
    @ExcelProperty(value = "购置日期")
    private Date purchaseDate;

    /**
     * 座位数
     */
    @ExcelProperty(value = "座位数")
    private Integer seatNum;

    /**
     * 车型
     */
    @ExcelProperty(value = "车型", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "clxh")
    private Integer model;

    /**
     * 车身颜色
     */
    @ExcelProperty(value = "车身颜色")
    private String color;

    /**
     * 使用性质
     */
    @ExcelProperty(value = "使用性质", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "syxz")
    private String usageNature;

    /**
     * 排量
     */
    @ExcelProperty(value = "排量", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "pl")
    private Integer displacement;

    /**
     * 备注信息
     */
    @ExcelProperty(value = "备注信息")
    private String remarks;

    /**
     * 购置日期状态（0：正常，1：临期（一个月内），2：超期）
     */
    private Integer purchaseDateStatus;

    /**
     * 保险期限
     */
    @JsonFormat(pattern = DatePattern.NORM_DATE_PATTERN)
    private Date insuranceEndDate;

    /**
     * 保险状态（0：正常，1：临期（一个月内），2：超期）
     */
    private Integer insuranceStatus;

    /**
     * 年检有效期
     */
    @JsonFormat(pattern = DatePattern.NORM_DATE_PATTERN)
    private Date validityEndDate;

    /**
     * 年检状态（0：正常，1：临期（一个月内），2：超期）
     */
    private Integer validityStatus;

    /**
     * 车辆保险信息
     */
    private List<VehicleInsuranceInfoVo> insuranceInfos;

    /**
     * 车辆维修记录
     */
    private List<VehicleRepairRecordVo> repairRecords;

    /**
     * 车辆年审记录
     */
    private List<VehicleAnnualInspectionRecordVo> annualInspectionRecords;

}
